package fr.afcepf.atod12.projet1.service;


import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import fr.afcepf.atod12.projet1.dao.interfaces.IDaoTypeMedecin;
import fr.afcepf.atod12.projet1.entities.Medecin;
import fr.afcepf.atod12.projet1.entities.TypeMedecin;

@Service("serviceTypeMedecin")
@Transactional
public class ServiceTypeMedecin implements IServiceTypeMedecin{

	@Autowired
	@Qualifier("daoTypeMedecin")
	public IDaoTypeMedecin  daoTypeMedecin = null;

	public List<String> getAllTypeMedecin() {
		return daoTypeMedecin.getAllSpecialite();
	}

	public List<TypeMedecin> getAllSpecialiteByMedecin(int idMedecin) {
		return daoTypeMedecin.getSpecialiteByMedecin(idMedecin);
	}

	@Override
	public List<Medecin> getAllMedecinBySpecialite(int idTypeMedecin) {
		return daoTypeMedecin.getAllMedecinBySpecialite(idTypeMedecin);
	}
	
	
	public final void setDaoTypeMedecin(IDaoTypeMedecin daoTypeMedecin) {
		this.daoTypeMedecin = daoTypeMedecin;
	}


}
